package top.infopub.job.bpa.service.impl;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.job.bpa.dao.ProContractDao;
import top.infopub.model.bpa.ProContract;
import top.infopub.job.bpa.service.ProContractService;

@Service
public class ProContractServiceImpl extends GenericServiceImpl<ProContract, String> implements
		ProContractService {

	@Autowired
	private ProContractDao proContractDao;
	
	@Override
	public GenericDao<ProContract, String> getDao() {
		return proContractDao;
	}
	
	@Override
    public int count(String proCode) {
        return proContractDao.count(proCode);
    }

    @Override
    public BigDecimal selectCaeFeeByProContractId(String proContractId) {
        BigDecimal rs = proContractDao.selectCaeFeeByProContractId(proContractId);
        if(rs == null){
            rs = BigDecimal.ZERO;
        }
        return rs;
    }

}